<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>VueJs指令：v-on：事件修饰符</title>
</head>
<body>

<div id="app">
    <a href="http://www.baidu.com" @click.prevent="gotoBaidu">点我我触发事件</a>
</div>

<script src="js/vue.min.js"></script>
<script >
    // 默认行为：在节点中默认行为的元素不多：a button input submit拥有默认行为
    // a 会触发锚点
    new Vue({
        el:"#app",
        data:{

        },
        methods:{
            gotoBaidu:function(){
                alert("去百度.....");
            }
        }
    })
</script>

</body>
</html>